const cmd = require("node-cmd")
import path from "path"

export class PackResult {
    private root: string
    constructor(projectRoot: string) {
        // this.root = path.join(projectRoot, "result")
        this.root = projectRoot
    }

    async pack() {
        const command = `cd ${this.root} && tar -cvf result.tar.gz result`
        console.log(command);

        return new Promise((resolve, reject) => {
            cmd.runSync(command)
            resolve("")
        })
        // return cmd.runSync(command)
    }
}